<?php

namespace Users\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
use Users\Form\RegisterForm;
use Zend\Authentication\AuthenticationService;
use Zend\Authentication\Adapter\DbTable as DbTableAuthAdapter;

class LoginController extends AbstractActionController
{
    public function getAuthService()
    {
	if(!$this->authsevice)
	{
	    $dbAdapter = $this->getServiceLocator()->get('Zend\Db\Adapter\Adapter');
	    $dbTableAuthAdapter = new DbTableAuthAdapter($dbAdapter, 'user','email','password', 'MD5(?)');
	    $authService = new AuthenticationService();
	    $authService->setAdapter($dbTableAuthAdapter);
	    $this->authservice = $authService;
	}
	return $this->authservice;
    }
    
    public function processAction()
    {
	
    }
}
